﻿using MDT.LifeSewagePlatform.Conmmon;
using MDT.LifeSewagePlatform.InterfaceService;
using MDT.LifeSewagePlatform.Entity;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Options;
using System.Collections.Generic;
using System.Threading.Tasks;

namespace MDT.LifeSewagePlatform.ServiceInstance.Controllers
{
    [Route("api/role")]
    [ApiController]
    [Authorize]
    public class RoleController : BaseController
    {
        #region ctor and prop
        [Autowired]
        private  IRoleService roleService { get; set; }
        public RoleController()
        {
        }
        #endregion

        #region method servcie
        /// <summary>
        /// 查询系统角色
        /// </summary>
        /// <returns></returns>
        [HttpGet]
        public async Task<BaseMessage> GetRoles()
        {
            return await roleService.GetRoles();
        }
        #endregion
    }
}
